import org.w3c.dom.ls.LSOutput;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 87111
 * Date: 2025-11-02
 * Time: 16:17
 */
public class Demo2 {
    public static void main(String[] args) throws InterruptedException {
        BlockingQueue<String> queue = new LinkedBlockingQueue<>(1000);
        String elem = queue.take();
        System.out.println("从队列中读取元素");
    }
}
